﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Actions;
using COFE.Core;

namespace COFE.Helpers.Subclasses
{
    public class Script
    {
        public enum ScriptType { text }

        public Guid RunScript(IEntryList input, string script, ScriptType scriptType = ScriptType.text)
        {
            var work = new ScriptableWork(Guid.NewGuid(),
                input, script, new TextScriptParser());
            return Scheduler.Enqueue(WorkPriority.Normal, work);
        }

        public IWorkScheduler Scheduler { get { return COFEActionShared.WorkScheduler; } }

    }
}
